﻿using Microsoft.AspNetCore.Builder;
using 请求响应加密.Middle;

namespace Zero.WebAPI.Framework.Extention
{
    public static class AppExtention
    {
        public static IApplicationBuilder UseExceptionHandle(this IApplicationBuilder app)
        {
            return app.UseMiddleware<ExceptionHandle>();
        }

        public static IApplicationBuilder UseEncrypt(this IApplicationBuilder app)
        {
            return app.UseMiddleware<EncryptionHandle>();
        }

        public static IApplicationBuilder UseApiAccessRecord(this IApplicationBuilder app)
        {
            return app.UseMiddleware<ApiExecuteTimeHandle>();
        }
    }
}
